//
//  JKRFallsLayout.h
//  JKRFallsDemo
//
//  Created by Lucky on 16/3/22.
//  Copyright © 2016年 Lucky. All rights reserved.
//

#import <UIKit/UIKit.h>
@class JKRFallsLayout;
@class STLaoutSizeModel;
@protocol JKRFallsLayoutDelegate <UICollectionViewDelegate>

@optional
/// 列数
- (CGFloat)columnCountInFallsLayout:(JKRFallsLayout *)fallsLayout;
/// 列间距
- (CGFloat)columnMarginInFallsLayout:(JKRFallsLayout *)fallsLayout;
/// 行间距
- (CGFloat)rowMarginInFallsLayout:(JKRFallsLayout *)fallsLayout;
/// collectionView边距
- (UIEdgeInsets)edgeInsetsInFallsLayout:(JKRFallsLayout *)fallsLayout;

@end

/************瀑布流layout，自己修改了一部分******************/
@interface JKRFallsLayout : UICollectionViewLayout

@property (nonatomic, weak) id<JKRFallsLayoutDelegate> delegate;
@property(nonatomic, strong) NSMutableArray <STLaoutSizeModel*>  *itemSizeHistory;
@end


@interface STLaoutSizeModel: NSObject
@property(nonatomic, strong) NSIndexPath                     *indexPath;
@property(nonatomic, assign) CGFloat                     itemHeight;
@property(nonatomic, assign) CGFloat                     itemWitdh;
@end
